/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uva;

import java.io.IOException;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 *
 * @author mohamed.azouz
 */
public class Solution {

    static int arr[] = new int[1000001];

    static int problem31(int n) {
        if (arr[n] != 0) {
            return arr[n];
        }
        if (n % 2 == 0) {
            return problem31(n / 2) + 1;
        } else {
            return problem31(3 * n + 1) + 1;
        }

    }

    static String ReadLn(int maxLg) // utility function to read from stdin
    {
        byte lin[] = new byte[maxLg];
        int lg = 0, car = -1;
        String line = "";

        try {
            while (lg < maxLg) {
                car = System.in.read();
                if ((car < 0) || (car == '\n')) {
                    break;
                }
                lin[lg++] += car;
            }
        } catch (IOException e) {
            return (null);
        }

        if ((car < 0) && (lg == 0)) {
            return (null);  // eof
        }
        return (new String(lin, 0, lg));
    }

    public static void main(String[] String) {
        Arrays.fill(arr, 0);
        arr[1] = 1;

        String line;
        StringTokenizer idata;
        while ((line = Main.ReadLn(255)) != null) {
            idata = new StringTokenizer(line);
            int i = Integer.valueOf(line.split("\\s+")[0]);
            int j = Integer.valueOf(line.split("\\s+")[1]);
            int max = -1;
            System.out.println(i + "  " + j);
            /*for (int k = i; k <= j; k++) {
                arr[k] = problem31(k);
                if (arr[k] > max) {
                    max = arr[k];
                }
            }*/
            System.out.println(line + " " + max);
        }
    }
}
